package com.levi.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "queue1")
public class Consumer1 {

    private static final Logger log = LoggerFactory.getLogger(Consumer1.class);

    @RabbitHandler
    public void receive(String message) {
        log.info("消费了了队列{}的消息,消息内容是{}","queue1",message);
    }
}
